package com.buddies.lottery.data.result;

import java.io.Serializable;

/**
 * Description: Api 返回结果数据基类
 * Date: 2018/2/24
 * Author: xuliang
 */
public class ApiResult<T> implements Serializable {

    public static final int RESULT_OK = 0;

    public T data;
    public int err;
    public String err_msg;
    public String renew_token;
    public long ts;

    public ApiResult() {

    }

    public ApiResult(int code, String msg, T data) {
        this.err = code;
        this.err_msg = msg;
        this.data = data;
    }

    public boolean isResultOk() {
        return RESULT_OK == err;
    }
}
